RDLC image not show by set report parameter - visual-studio-2010

I am working with RDLC Report in 2010
I want to bind image from external source
ReportParameter rpara = new ReportParameter("rpt1", "D:\\Projects\\Image\\logo.jpg");
ReportViewer1.LocalReport.EnableExternalImages = true;
ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rpara });
I also set all the property of rdlc design like
add parameter rpt1 in report data window
add new image in body part then set image property to external and select report parameter
everything okay but still I am not able to get image on my report viewer

Try to use this way
string imagepath = "File:///" + "C:\\image.jpg";
this.reportViewer1.LocalReport.EnableExternalImages = true;
ReportParameter[] param = new ReportParameter[1];
param[0] = new ReportParameter("Path", imagepath);
this.reportViewer1.LocalReport.SetParameters(param);
this.reportViewer1.RefreshReport();

Related

Is there any way to get google classroom form question insert title image URL

I want to get the image url which is inserted when create a question into the classroom form.
Below is the code through we get the title , choices if available but i am not able to get the image url which is insert under the question title.
function getCourse() {
var form = FormApp.openById(id);
var formResponses = form.getItems();
var type=formResponses[0].getType();
var title = formResponses[0].getTitle();
var image =formResponses[0].getImage();//no such method Logger.log(image);
}
That image is not available through the Forms Service, it's added through the /viewresponse source code which is generated some way by Google. You could get it by using the URL Fetch Service (UrlFetchApp).
Related
How can I scrape text and images from a random web page?
(javascript / google scripts) How to get the title of a page encoded with iso-8859-1 so that the title will display correctly in my utf-8 website?
var blob = questionType.getImage();
var b64 = blob.getContentType() + ';base64,'+ Utilities.base64Encode(blob.getBytes());
var html = "data:" + b64 ;

Oracle Apex PDF Viewer

i am new in Oracle-Apex. I need Help to show a PDF in Oracle APEX. I have a question: I have uploaded the PDF in to the Database. I save the PDF as a blob in database. After that i showed the name of the PDF in Classic Report.When i click on the name, i want to see the preview of the PDF that i had uploaded.
Now i am searching a way to show the PDF with a Code. Can somebody help?
I need previous and next button.
How can i show this PDF in the Region?here is my Page
Here's an example I quickly whipped up using APEX_APPLICATION_TEMP_FILES. Hopefully it's what you're trying to achieve.
https://apex.oracle.com/pls/apex/f?p=34781
Username: demo
Password: demo
This uses the PDF.js project by Mozilla. Here's a quick recipe of what you may need.
Create a File Browse page item and set the Storage Type to Table APEX_APPLICATION_TEMP_FILES.
Create a page button to submit the page.
Create a Classic Report region and enter the following query:
select
id
, filename
from apex_application_temp_files
where application_id = :APP_ID
Add a virtual column and set the HTML Expression:
<button type="button" class="btn-preview-pdf" data-id="#ID#">Preview</button>
Create a region and enter the following in the Source:
<canvas id="preview-pane"></canvas>
Create a Click dynamic action.
a. Set the selection Type to jQuery Selector.
b. Enter the jQuery Selector .btn-preview-pdf.
Add a Execute JavaScript Code action with the following JS code (check out the examples from the PDF.js website for more details on what the code does):
var fileId = $(this.triggeringElement).data('id');
var docUrl = 'f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=DOWNLOADPDF:::FILE_ID:' + fileId;
var previewPane = this.affectedElements[0];
// from PDF.js examples
pdfjsLib.getDocument(docUrl).then(function(pdf) {
var pageNumber = 1;
pdf.getPage(pageNumber).then(function(page) {
console.log('Page loaded');
var scale = 1.5;
var viewport = page.getViewport(scale);
// Prepare canvas using PDF page dimensions
var canvas = previewPane;
var context = canvas.getContext('2d');
canvas.height = viewport.height;
canvas.width = viewport.width;
// Render PDF page into canvas context
var renderContext = {
canvasContext: context,
viewport: viewport
};
var renderTask = page.render(renderContext);
renderTask.then(function () {
console.log('Page rendered');
});
})
}, function(reason) {
console.error(reason);
});
For the action, also set the Affected Elements:
a. Selection Type: jQuery Selector
b. jQuery Selector: #preview-pane
Follow Joel Kallman's post on creating a link to download a file. You will need an Application Process (DOWNLOADPDF) and an Application Item (FILE_ID) The modified code for the Application Process DOWNLOADPDF looks like this:
begin
for file in (select *
from apex_application_temp_files
where id = :FILE_ID) loop
--
sys.htp.init;
sys.owa_util.mime_header( file.mime_type, FALSE );
sys.htp.p('Content-length: ' || sys.dbms_lob.getlength( file.blob_content));
sys.htp.p('Content-Disposition: attachment; filename="' || file.filename || '"' );
sys.htp.p('Cache-Control: max-age=3600'); -- tell the browser to cache for one hour, adjust as necessary
sys.owa_util.http_header_close;
sys.wpg_docload.download_file( file.blob_content );
apex_application.stop_apex_engine;
end loop;
end;
Almost missed this out. On the Page Attributes, set the JavaScript File URLs to any of the CDNs listed. For example:
//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.550/pdf.min.js
Note that this is a very basic prototype. The preview only allows you to view the first page. You will need to figure out the API and then do the necessary to allow multipage viewing. I'll leave you to figure that out.
That should be it. Let me know if it doesn't work for you.

How to display ToolTip for AdvanceDatagridColumn in Flex

I want to display ToolTip for AdvanceDataGridColumn. The headerText is set as 'ABBR' and ToolTip should be 'internalName'. I am creating columns dynamically as below. Can anyone tell me how I can acheive this.
var paxCountNames:AdvancedDataGridColumn = new AdvancedDataGridColumn();
paxCountNames.dataField = obj['classOfSvcId']+obj['internalName'];
paxCountNames.headerText = obj['abbr'];
paxCountNames.dataTipField = obj['internalName'];
paxCountNames.width = 40;
paxCountNames.itemRenderer = new ClassFactory(ADGTextInputRenderer);
passengerCount.children.push(paxCountNames);
You can also use paxCountNames.dataTipFunction instead of paxCountNames.dataTipField.
paxCountNames.dataTipFunction = dTFunction;
function buildToolTip( item:Object ):String {
return item.someProperty; // some property you need
}
But is necessary to specify paxCountNames.showDataTips = true as mentioned above.
Assuming you have successfully created columns dynamically, the only thing you need to do is setting 'showDataTips' property of each column to true to show tooltips.
Example:
paxCountNames.showDataTips = true;

How to add Image, from Path in RDLC Report

Helllo, How to add image from Path In RDLC report?? Where in database only image name is saved.
And Reporting Code Like that
{
EmployeeDataSetTableAdapters.tblAdditionalInfoTableAdapter adpPic = new EmployeeDataSetTableAdapters.tblAdditionalInfoTableAdapter();
EmployeeDataSet.tblAdditionalInfoDataTable tblPic = new EmployeeDataSet.tblAdditionalInfoDataTable();
adpPic.Fill(tblPic);
ReportDataSource mds2 = new ReportDataSource("Pics", (DataTable)tblPic);
this.ReportViewer1.LocalReport.DataSources.Clear();
this.ReportViewer1.LocalReport.ReportPath = Server.MapPath("PrintID.rdlc");
this.ReportViewer1.LocalReport.DataSources.Add(mds2);
this.ReportViewer1.LocalReport.Refresh();
}
Check below links. It will explain how images add in RDLC Report.
The video contain a demo of works
https://www.youtube.com/watch?v=RxS323bLdFs
http://easyprogrammingtechniques.blogspot.in/2014/02/how-to-add-image-in-rdlc-report.html

Custom telerik gridview for winforms doesn't bind the data

Custom control for telerik grid view in winforms
In my Windows forms control library:
for MyGrid.cs (where MyGrid.cs is a component class)
public MyGrid : Telerik.WinControls.UI.RadGridView
I build and i have MyGrid.dll & i have added that in my visual studio toolbox (also referenced that dll in my consuming winform app).
Consuming winform app:
In Form1.cs, i drag and drop that MyGrid & i write this code:
MyGrid1.DataSource=ds.Table[0]; //Dataset
The grid doesn't get bound with records, whereas when i check ds row count it has 150 records. The grid however shows me green and white color (ie. alternating row color), but doesn't bind the data.
This is the code that consuming winform uses
DataSet ds = null;
string connectionString = "Data Source=test;Initial Catalog=DBname;Integrated Security=True";
string sql = " SELECT ID,FirstName from table1 ";
SqlConnection connection = null;
connnection = new SqlConnection(connectionString);
SqlDataAdapter dataadapter = new SqlDataAdapter(sql, connection);
ds= new System.Data.DataSet();
connection.Open();
dataadapter.Fill(ds, "Table1");
MyGrid1.DataSource = ds.Tables[0];
where MyGrid1 is the custom control that is being dragged and dropped from toolbox.
Custom control code:
this.EnableAlternatingRowColor = true;
this.TableElement.AlternatingRowColor = System.Drawing.Color.Green;
this.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
this.AutoGenerateColumns = true;
The telerik grid is not binding the data, however when i click on the cell, it shows me the value. Any thoughts?

Resources