Add watermark from report parameter or from data set values - c#

How to add watermark at run time in crystal report using
any of the below procedure
1- Report parameter (simple text) to print on report
2- Report parameter (image path) to get image from path
Any other approach if better to display dynamic watermark?

Crystal supports specifying an image path at runtime.
Right-click your static image on the report layout. Select 'Format Graphic'.
Select the 'Picture' tab.
Note the 'Graphic Location' allows you to enter a formula expression. Enter in that expression the dynamic path to the desired image.

Related

How can I display image from SQL table to xtrareport picturebox C#?

I created a QrCode on my invoice form, then I save this Qrcode as an image in a SQL table.
I want to display the image of the Qrcode from SQL table in a Xtrareport.
Any idea how to do that?
Save the QR image as Binary as Type in SQL.
In XtraReport, access the DB via SqlDataSource and generate a Query to obtain stored binary data.
Set the QR code image column name for Query in the Expression property of the XRPictureBox that you placed in XtraReport.
When a report is generated, the image is automatically displayed in the XRPictureBox that you placed in the report.
This is how my project shows the company logo placed in the report.

Merging more than one rdlc into single reportviewer control

I want to merge 2 .rdlc files (with C#) into a single .rdlc so that it prints in a single file in reportviewer control.
This is what I'm trying:
this.reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.ReportPath = "model1.rdlc";
reportViewer1.LocalReport.ReportPath = "model2.rdlc";
this.reportViewer1.LocalReport.DataSources.Add(datasource);
this.reportViewer1.RefreshReport();
but it's only showing me the second report (model2.rdlc)
Reportviewer show's just one report file at time
because you overwrite the report path at the second line
it behaves like that (showing the last report)
You have some options:
1- Using subreport inside the first report and setting the supreport parameter as report 2.
2- Using multiple data sourses for one report and merge the two reports in the report.
3- Using the page brake option to split your report to multiple pages but it has some limitation because of it cannot work at any area unless it has a container in the report like (table - rectangle - matrix).

Show parameter values inside table RDLC Report

I need to show parameters values inside table of rdlc report. When I put static text it is showing but parameter's values showed empty.
I need to show data in below format which can b easily done using table.
You can show report parameters using this syntax:
=Parameters!YourParameterName.Value

Changing report header textbox value from user input when winform application running

I have a Crystal Reports to display invoice from a sale. I want to change the report header textbox manually. Means, i have a form named as Crystal report settings. I have a textbox in there to change report header. I have a textbox object in crystal reports. When i add a value in textbox in crystal report settings form and clock on change it should change the value in textbox object in crystal report permanently. I am using it to allow shops to change header details. is there any way to achieve it? How can i permanently get values in textbox object of crystal report from user input?
Crystal Report Text Object is shown below
From the textbox shows below i want to get values for textbox object in crystal reports
I would suggest you to save your caption/Header of report within database and fetch from there, it will reduce the complexity.
If you insist on using the form, then pass the changed caption/Header value to the form of crystal report through constructor or global variable approach. create a property within your change caption/header form, set its value and get it within your crystal report form and set it i.e.
((TextObject)reportDocument.ReportDefinition.ReportObjects["Invoice_HeaderText"]).Text="Changed Header";

Generate RDLC Report with two columns

I need to build a report (.RDLC in visual studio 2012) that contais a long text in two columns by page.
I can't just add a new column in the report, because the content above of this long text will be dynamically, so, this control (to fill the text in the second column) must be dynamically too.
Also, i need to add others parts of the report after the text ends.
Somebody knows how to do this?

Categories

Resources