• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

How to display the parameter value on crystal report . NET

I am working on VB.Net and use crystal report viewer.
there are 2 parameters pass from the front field to crystal report-> run button->report will display as PDF file.
But now, the user want to see the parameter values on the report title. The 2 parameters are Start Date and End Date.

What I did is in crystal report design (in MS Visual Studio), just drag and drop the pameter fields to the report title like:  {?Start Date} and {?End Date}.
If I view the report in MS Visual Studio, it parameter value display fine. But when I go to web and refresh the page, the parameter value still does not show on the report (PDF). l

Did I missing anything?
0
FinghtingMiao
Asked:
FinghtingMiao
  • 3
1 Solution
 
kodok_gorengCommented:
Is it after calling the report parameter values ¿¿already loaded?
This code may be helpful
This code is placed before rendering report
Dim VarReport As New Report
....
VarReport.SetParameterValue("StartDate", "Date Value") 
VarReport.SetParameterValue("End Date", "Date Value") 

Open in new window

0
 
CodeCruiserCommented:
>If I view the report in MS Visual Studio, it parameter value display fine. But when I go to web and refresh the page, the parameter value still does not show on the report (PDF).

Is that after you replaced the old report with new one? And is that after exporting to PDF from the new report?
0
 
FinghtingMiaoAuthor Commented:
CodeCruiser:
Yes, exactly as what you said.
It happens after I saved the modified report, which you can say the new one replace the old one.
Yes, report will export to PDF, after export to PDF and display on the web, the parameters value gone!

Thank you
0
 
FinghtingMiaoAuthor Commented:
kodok_goreng:

I used the code  you provided: SetParameterValue.
The parameter value still not display in the report which exported to PDF.

Any idea?   So how we can pass the parameter value to crystal report and also can display in the Exported PDF format_report?

Thank you !!
0
 
FinghtingMiaoAuthor Commented:
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now