on 01-20-2016 7:02 AM
im use following code to generate pdf from crystal report in ASP.NET MVC platform
[HttpGet]
public ActionResult ClassCard()
{
ReportDocument rd = new ReportDocument();
rd.Load(Path.Combine(Server.MapPath("~/Reports"), "ClassCard.rpt"));
rd.SetParameterValue("ClassName", "Kandy");
rd.SetParameterValue("Type", "Group Theory");
rd.SetParameterValue("year", "2016");
rd.SetParameterValue("Student", "KDG0012");
rd.SetDatabaseLogon("DB_74931_rmsecon_user", "snb123");
Response.Buffer = false;
Response.ClearContent();
Response.ClearHeaders();
try
{
Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf", "EverestList11.pdf");
}
catch (Exception ex)
{
throw ex;
}
}
this give me pdf as below
but as you see the barcode is shrinked ,how im solve this problem in ASP.NET MVC enviroment
i saw most people say add registy key ,but i cannot do this coz this is asp.net mvc web application and im going host this app on sheared server
if im Add below regiter keys the problem will solve only for if im generate crystal report in local desktop app please help
Search for this KBA - 2165260
It lists a bunch of registry keys you can add to your app server and/or local PC's to stop CRD/SDK from reducing the font.
And Make sure the printer you designed the report on is also the same one being used.
See KBA 2163438 for a sample app to test printing.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear don
its not practical ,do you ever think shared server (godaddy,winhost,1to1) will give access to registry ! and this problem quite old one , any updated DLL for that problem becoz making changes in registry is not a good solution for every one any help Don?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Only godaddy, winhost, 1to1 would know - right? I don't really see that as an SAP issue(?).
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
Got Enhancement ideas? Use the SAP Idea Place
Just added this to the Idea Place: Expose Registry Options (e.g. Font Shrinking on Export) via Code : View Idea
If enough people vote in up, SAP may implement it.
Thank you Ido,
I sent an e-mail to our DEV owners to see if we could use the App.config file to do this in. We already have a few keys that we use there now so exposing more should be relatively easy to do for them.
But there are so many so not sure if we can do them all or not but the important ones like exporting would be a good start.
Don
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.